home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / Kernel.a < prev    next >
Text File  |  1996-05-01  |  37KB  |  1,336 lines

  1. ;
  2. ;    File:        Kernel.a
  3. ;
  4. ;    Contains:    Kernel Interfaces
  5. ;
  6. ;    Version:    Technology:    System 8
  7. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__KERNEL__') = 'UNDEFINED' THEN
  19. __KERNEL__ SET 1
  20.  
  21.     IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
  22.     include 'Errors.a'
  23.     ENDIF
  24.     IF &TYPE('__MACHINEEXCEPTIONS__') = 'UNDEFINED' THEN
  25.     include 'MachineExceptions.a'
  26.     ENDIF
  27.     IF &TYPE('__TIMING__') = 'UNDEFINED' THEN
  28.     include 'Timing.a'
  29.     ENDIF
  30.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  31.     include 'Types.a'
  32.     ENDIF
  33.     IF FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE THEN
  34. ;  Kernel basics
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45. ;  Tasking
  46. ; typedef UInt32                         ExecutionLevel
  47.  
  48.  
  49. kTaskLevel                        EQU        0
  50. kSoftwareInterruptLevel            EQU        1
  51. kAcceptFunctionLevel            EQU        2
  52. kKernelLevel                    EQU        3
  53. kSIHAcceptFunctionLevel            EQU        4
  54. kSecondaryInterruptLevel        EQU        5
  55. kHardwareInterruptLevel            EQU        6
  56. ;  Memory System basics
  57. LogicalAddressRange        RECORD 0
  58. address                     ds.l    1                ; offset: $0 (0)
  59. count                     ds.l    1                ; offset: $4 (4)
  60. sizeof                     EQU *                    ; size:   $8 (8)
  61.                         ENDR
  62. ; typedef struct LogicalAddressRange *    LogicalAddressRangePtr
  63.  
  64. PhysicalAddressRange    RECORD 0
  65. address                     ds.l    1                ; offset: $0 (0)
  66. count                     ds.l    1                ; offset: $4 (4)
  67. sizeof                     EQU *                    ; size:   $8 (8)
  68.                         ENDR
  69. ; typedef struct PhysicalAddressRange *    PhysicalAddressRangePtr
  70.  
  71. ;  For PrepareMemoryForIO and CheckpointIO
  72. ; typedef OptionBits                     IOPreparationOptions
  73.  
  74.  
  75. kIOMultipleRanges                EQU        $00000001
  76. kIOLogicalRanges                EQU        $00000002
  77. kIOMinimalLogicalMapping        EQU        $00000004
  78. kIOShareMappingTables            EQU        $00000008
  79. kIOIsInput                        EQU        $00000010
  80. kIOIsOutput                        EQU        $00000020
  81. kIOCoherentDataPath                EQU        $00000040
  82. kIOTransferIsLogical            EQU        $00000080
  83. kIOClientIsUserMode                EQU        $00000080
  84. ; typedef OptionBits                     IOPreparationState
  85.  
  86.  
  87. kIOStateDone                    EQU        $00000001
  88.  
  89. kInvalidPageAddress                EQU        -1
  90. AddressRange            RECORD 0
  91. base                     ds.l    1                ; offset: $0 (0)
  92. length                     ds.l    1                ; offset: $4 (4)
  93. sizeof                     EQU *                    ; size:   $8 (8)
  94.                         ENDR
  95. ;  C's treatment of arrays and array pointers is atypical
  96. LogicalMappingTable        RECORD 0
  97. elements                 ds.l    1
  98. sizeof                     EQU *                    ; size:   $4 (4)
  99.                         ENDR
  100.  
  101.  
  102. ; typedef LogicalMappingTable *            LogicalMappingTablePtr
  103.  
  104. PhysicalMappingTable    RECORD 0
  105. elements                 ds.l    1
  106. sizeof                     EQU *                    ; size:   $4 (4)
  107.                         ENDR
  108.  
  109.  
  110. ; typedef PhysicalMappingTable *        PhysicalMappingTablePtr
  111.  
  112. AddressRangeTable        RECORD 0
  113. elements                 ds.b    1 * AddressRange.sizeof
  114. sizeof                     EQU *                    ; size:   $8 (8)
  115.                         ENDR
  116.  
  117.  
  118. ; typedef AddressRangeTable *            AddressRangeTablePtr
  119.  
  120. MultipleAddressRange    RECORD 0
  121. entryCount                 ds.l    1                ; offset: $0 (0)
  122. rangeTable                 ds.l    1                ; offset: $4 (4)
  123. sizeof                     EQU *                    ; size:   $8 (8)
  124.                         ENDR
  125. ;
  126. ; Separate C definition so that union has a name.  A future version of the interfacer
  127. ; tool will allow a name (that gets thrown out in Pascal and Asm).
  128. ;
  129. IOPreparationTable        RECORD 0
  130. options                     ds.l    1                ; offset: $0 (0)
  131. state                     ds.l    1                ; offset: $4 (4)
  132. preparationID             ds.l    1                ; offset: $8 (8)
  133. addressSpace             ds.l    1                ; offset: $C (12)
  134. granularity                 ds.l    1                ; offset: $10 (16)
  135. firstPrepared             ds.l    1                ; offset: $14 (20)
  136. lengthPrepared             ds.l    1                ; offset: $18 (24)
  137. mappingEntryCount         ds.l    1                ; offset: $1C (28)
  138. logicalMapping             ds.l    1                ; offset: $20 (32)
  139. physicalMapping             ds.l    1                ; offset: $24 (36)
  140. range                     ds        AddressRange    ; offset: $28 (40)
  141.                          ORG 40
  142. multipleRanges             ds        MultipleAddressRange ; offset: $28 (40)
  143. sizeof                     EQU *                    ; size:   $30 (48)
  144.                         ENDR
  145. ; typedef OptionBits                     IOCheckpointOptions
  146.  
  147.  
  148. kNextIOIsInput                    EQU        $00000001
  149. kNextIOIsOutput                    EQU        $00000002
  150. kMoreIOTransfers                EQU        $00000004
  151. ;  For SetProcessorCacheMode
  152. ; typedef UInt32                         ProcessorCacheMode
  153.  
  154.  
  155. kProcessorCacheModeDefault        EQU        0
  156. kProcessorCacheModeInhibited    EQU        1
  157. kProcessorCacheModeWriteThrough    EQU        2
  158. kProcessorCacheModeCopyBack        EQU        3
  159. ;  For GetPageInformation
  160.  
  161. kPageInformationVersion            EQU        1
  162. ; typedef UInt32                         PageStateInformation
  163.  
  164.  
  165. kPageIsProtected                EQU        $00000001
  166. kPageIsProtectedPrivileged        EQU        $00000002
  167. kPageIsModified                    EQU        $00000004
  168. kPageIsReferenced                EQU        $00000008
  169. kPageIsLockedResident            EQU        $00000010
  170. kPageIsInMemory                    EQU        $00000020
  171. kPageIsShared                    EQU        $00000040
  172. kPageIsWriteThroughCached        EQU        $00000080
  173. kPageIsCopyBackCached            EQU        $00000100
  174. kPageIsLocked                    EQU        $00000010            ; Deprecated
  175. kPageIsResident                    EQU        $00000020            ; Deprecated
  176. PageInformation            RECORD 0
  177. area                     ds.l    1                ; offset: $0 (0)
  178. count                     ds.l    1                ; offset: $4 (4)
  179. information                 ds.l    1                ; offset: $8 (8) <-- really an array of length one
  180. sizeof                     EQU *                    ; size:   $C (12)
  181.                         ENDR
  182. ; typedef struct PageInformation *        PageInformationPtr
  183.  
  184.     ENDIF
  185.     IF FOR_SYSTEM8_PREEMPTIVE THEN
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204. ;   System Information  
  205.  
  206. kSystemInformationVersion        EQU        1
  207. SystemInformation        RECORD 0
  208. numPhysicalRAMPages         ds.l    1                ; offset: $0 (0)
  209. numFreeRAMPages             ds.l    1                ; offset: $4 (4)
  210. numEligibleRAMPages         ds.l    1                ; offset: $8 (8)
  211. numResidentRAMPages         ds.l    1                ; offset: $C (12)
  212. numInMemoryGlobalPages     ds.l    1                ; offset: $10 (16)
  213. numLogicalPages             ds.l    1                ; offset: $14 (20)
  214. pageSize                 ds.l    1                ; offset: $18 (24)
  215. dataCacheBlockSize         ds.l    1                ; offset: $1C (28)
  216. processorVersionNumber     ds.l    1                ; offset: $20 (32)
  217. numCPUs                     ds.l    1                ; offset: $24 (36)
  218. systemKernelProcessID     ds.l    1                ; offset: $28 (40)
  219. globalAddressSpaceID     ds.l    1                ; offset: $2C (44)
  220. dataCacheSize             ds.l    1                ; offset: $30 (48)
  221. instructionCacheSize     ds.l    1                ; offset: $34 (52)
  222. cachesAreUnified         ds.b    1                ; offset: $38 (56)
  223. filler                     ds.b    3                ; offset: $39 (57)
  224. sizeof                     EQU *                    ; size:   $3C (60)
  225.                         ENDR
  226. ; typedef struct SystemInformation *    SystemInformationPtr
  227.  
  228. ;   KernelQueue Related Declarations  
  229. ; typedef OptionBits                     KernelQueueOptions
  230.  
  231. ;   Event Flag Related Declarations  
  232. ; typedef UInt32                         EventGroupMask
  233.  
  234.  
  235. kEventFlagsPerGroup                EQU        32
  236. ; typedef UInt32                         EventFlagOperation
  237.  
  238.  
  239. kEventFlagAll                    EQU        0
  240. kEventFlagAny                    EQU        1
  241. kEventFlagAllClear                EQU        2
  242. kEventFlagAnyClear                EQU        3
  243. kEventFlagSharedClear            EQU        4
  244. KernelNotification        RECORD 0
  245. eventGroup                 ds.l    1                ; offset: $0 (0)
  246. eventMask                 ds.l    1                ; offset: $4 (4)
  247. swi                         ds.l    1                ; offset: $8 (8)
  248. kernelQueue                 ds.l    1                ; offset: $C (12)
  249. queueP1                     ds.l    1                ; offset: $10 (16)
  250. queueP2                     ds.l    1                ; offset: $14 (20)
  251. sizeof                     EQU *                    ; size:   $18 (24)
  252.                         ENDR
  253. ; typedef struct KernelNotification *    KernelNotificationPtr
  254.  
  255. ;   Task Related Declarations  
  256. ; typedef OSType                         KernelProcessName
  257.  
  258. ; typedef OSType                         TaskName
  259.  
  260. ; typedef UInt32                         TaskStorageIndex
  261.  
  262. ; typedef void *                        TaskStorageValue
  263.  
  264. ; typedef UInt32                         TaskRelationship
  265.  
  266.  
  267. kTaskOnly                        EQU        0
  268. kTaskAndChildren                EQU        1
  269. kTaskFamily                        EQU        2
  270. kTaskKernelProcess                EQU        3
  271. ; typedef OptionBits                     SetTaskPriorityOptions
  272.  
  273.  
  274. kTaskRaisePriorityBy            EQU        $00000200
  275. kTaskLowerPriorityBy            EQU        $00000400
  276. kTaskRaisePriorityToAtLeast        EQU        $00000800
  277. kTaskLowerPriorityToAtMost        EQU        $00001000
  278. ; typedef OptionBits                     TaskOptions
  279.  
  280.  
  281. kTaskIsOrphan                    EQU        $00400000
  282. kTaskIsResident                    EQU        $00004000
  283. ;  Priorities are used by CreateTask, SetTaskPriority, and AcceptMessage. 
  284. ; typedef OptionBits                     TaskPriority
  285.  
  286.  
  287. kTaskPriorityMask                EQU        $0000001F
  288. kTaskPriorityIsAbsolute            EQU        $00000100
  289. kTaskPriorityIsSymbolic            EQU        $00002000
  290. kTaskBackgroundPriority            EQU        $00002001            ; Gets only otherwise idle time
  291. kTaskAppCPUBoundPriority        EQU        $00002002            ; For CPU bound tasks
  292. kTaskAppNonUIPriority            EQU        $00002003            ; For general secondary tasks
  293. kTaskAppPriority                EQU        $00002004            ; Primary tasks
  294. kTaskUIHelperPriority            EQU        $00002005            ; Toolbox helper tasks
  295. kTaskLowServerPriority            EQU        $00002006            ; System servers
  296. kTaskServerPriority                EQU        $00002007            ; System serverss
  297. kTaskHighServerPriority            EQU        $00002008            ; System servers
  298. kTaskLowDriverPriority            EQU        $00002009            ; IO Families & plug-ins
  299. kTaskDriverPriority                EQU        $0000200A            ; IO Families & plug-ins
  300. kTaskHighDriverPriority            EQU        $0000200B            ; IO Families & plug-ins
  301. kTaskRealTimePriority1            EQU        $0000200C            ; Lowest real time priority
  302. kTaskRealTimePriority2            EQU        $0000200D
  303. kTaskRealTimePriority3            EQU        $0000200E
  304. kTaskRealTimePriority4            EQU        $0000200F
  305. kTaskRealTimePriority5            EQU        $00002010
  306. kTaskRealTimePriority6            EQU        $00002011
  307. kTaskRealTimePriority7            EQU        $00002012
  308. kTaskRealTimePriority8            EQU        $00002013
  309. kTaskRealTimePriority9            EQU        $00002014
  310. kTaskRealTimePriority10            EQU        $00002015
  311. kTaskRealTimePriority11            EQU        $00002016
  312. kTaskRealTimePriority12            EQU        $00002017
  313. kTaskRealTimePriority13            EQU        $00002018
  314. kTaskRealTimePriority14            EQU        $00002019
  315. kTaskRealTimePriority15            EQU        $0000201A
  316. kTaskRealTimePriority16            EQU        $0000201B            ; Highest real time priority
  317. ; typedef OptionBits                     TerminateOptions
  318.  
  319. ; typedef OSType                         SchedulerState
  320.  
  321.  
  322. kTaskInformationVersion            EQU        1
  323. TaskInformation            RECORD 0
  324. name                     ds.l    1                ; offset: $0 (0)
  325. owningKernelProcess         ds.l    1                ; offset: $4 (4)
  326. options                     ds.l    1                ; offset: $8 (8)        ;  Includes originally specified symbolic priority
  327. priority                 ds.l    1                ; offset: $C (12)        ;  Absolute priority
  328. taskState                 ds.l    1                ; offset: $10 (16)
  329. swiState                 ds.l    1                ; offset: $14 (20)
  330. isTerminating             ds.b    1                ; offset: $18 (24)
  331. reserved2                 ds.b    3                ; offset: $19 (25)
  332. softwareInterrupts         ds.l    1                ; offset: $1C (28)
  333. stackLimit                 ds.l    1                ; offset: $20 (32)
  334. stackSize                 ds.l    1                ; offset: $24 (36)
  335. creationTime             ds        AbsoluteTime    ; offset: $28 (40)
  336. cpuTime                     ds        AbsoluteTime    ; offset: $30 (48)
  337. reserved                 ds.l    1                ; offset: $38 (56)
  338. sizeof                     EQU *                    ; size:   $3C (60)
  339.                         ENDR
  340. ; typedef struct TaskInformation *        TaskInformationPtr
  341.  
  342. ; typedef OptionBits                     KernelProcessOptions
  343.  
  344.  
  345. kKernelProcessIsPrivileged        EQU        $00000001
  346.  
  347. kKernelProcessInformationVersion EQU    1
  348. KernelProcessInformation RECORD 0
  349. name                     ds.l    1                ; offset: $0 (0)
  350. addressSpace             ds.l    1                ; offset: $4 (4)
  351. options                     ds.l    1                ; offset: $8 (8)
  352. sizeof                     EQU *                    ; size:   $C (12)
  353.                         ENDR
  354. ; typedef struct KernelProcessInformation * KernelProcessInformationPtr
  355.  
  356. ;  Timer related declarations 
  357. ; typedef OptionBits                     TimerOptions
  358.  
  359. ;   Address Space Management related declarations  
  360. ;  General definitions
  361.  
  362. kNoBackingObjectID                EQU        0
  363. ; typedef OptionBits                     AreaOptions
  364.  
  365.  
  366. kZeroFill                        EQU        $00000001
  367. kResidentArea                    EQU        $00000002
  368. kSparseArea                        EQU        $00000004
  369. kPlacedArea                        EQU        $00000008
  370. kGlobalArea                        EQU        $00000010
  371. kPhysicallyContiguousArea        EQU        $00000020
  372. kMassMappedArea                    EQU        $00000040
  373. ; typedef OptionBits                     InterspaceCopyOptions
  374.  
  375.  
  376. kCheckSourceUserRights            EQU        $00000001
  377. kCheckDestinationUserRights        EQU        $00000002
  378. ; typedef UInt32                         AreaUsage
  379.  
  380.  
  381. kUsageUnknown                    EQU        0
  382. kUsageRAM                        EQU        1
  383. kUsageROM                        EQU        2
  384. kUsageIO                        EQU        3
  385. kUsageVideoRAM                    EQU        4
  386. ; typedef UInt32                         MemoryAccessLevel
  387.  
  388.  
  389. kMemoryExcluded                    EQU        0
  390. kMemoryReadOnly                    EQU        1
  391. kMemoryReadWrite                EQU        2
  392. kMemoryCopyOnWrite                EQU        3
  393. kInheritUserAccess                EQU        4
  394. kInheritPrivilegedAccess        EQU        5
  395. BackingAddress            RECORD 0
  396. f                         ds        UInt64
  397. sizeof                     EQU *                    ; size:   $8 (8)
  398.                         ENDR
  399.  
  400.  
  401. BackingLength            RECORD 0
  402. f                         ds        UInt64
  403. sizeof                     EQU *                    ; size:   $8 (8)
  404.                         ENDR
  405.  
  406.  
  407. ;     For GetSpaceInformation
  408.  
  409. kSpaceInformationVersion        EQU        1
  410. SpaceInformation        RECORD 0
  411. numLogicalPages             ds.l    1                ; offset: $0 (0)
  412. numInMemoryPages         ds.l    1                ; offset: $4 (4)
  413. numResidentPages         ds.l    1                ; offset: $8 (8)
  414. sizeof                     EQU *                    ; size:   $C (12)
  415.                         ENDR
  416. ; typedef struct SpaceInformation *        SpaceInformationPtr
  417.  
  418. ;     For GetAreaInformation
  419.  
  420. kAreaInformationVersion            EQU        1
  421. AreaInformation            RECORD 0
  422. addressSpace             ds.l    1                ; offset: $0 (0)
  423. base                     ds.l    1                ; offset: $4 (4)
  424. length                     ds.l    1                ; offset: $8 (8)
  425. userAccessLevel             ds.l    1                ; offset: $C (12)
  426. privilegedAccessLevel     ds.l    1                ; offset: $10 (16)
  427. usage                     ds.l    1                ; offset: $14 (20)
  428. backingObject             ds.l    1                ; offset: $18 (24)
  429. backingBase                 ds        BackingAddress ; offset: $1C (28)
  430. options                     ds.l    1                ; offset: $24 (36)
  431. owningKernelProcess         ds.l    1                ; offset: $28 (40)
  432. sizeof                     EQU *                    ; size:   $2C (44)
  433.                         ENDR
  434. ; typedef struct AreaInformation *        AreaInformationPtr
  435.  
  436. ;     For Memory Reservations
  437. ; typedef OptionBits                     ReservationOptions
  438.  
  439.  
  440. kPlacedReservation                EQU        $00000001
  441. kGlobalReservation                EQU        $00000002
  442. kGlobalAreaReservation            EQU        $00000004
  443. ;     For GetReservationInformation
  444.  
  445. kReservationInformationVersion    EQU        1
  446. ReservationInformation    RECORD 0
  447. addressSpace             ds.l    1                ; offset: $0 (0)
  448. base                     ds.l    1                ; offset: $4 (4)
  449. length                     ds.l    1                ; offset: $8 (8)
  450. options                     ds.l    1                ; offset: $C (12)
  451. sizeof                     EQU *                    ; size:   $10 (16)
  452.                         ENDR
  453. ; typedef struct ReservationInformation * ReservationInformationPtr
  454.  
  455. ;     For ControlPagingForRange
  456. ; typedef UInt32                         PageControlOperation
  457.  
  458.  
  459. kControlPageMakePageable        EQU        1
  460. kControlPageMakeResident        EQU        2
  461. kControlPageCommit                EQU        3
  462. kControlPageTouch                EQU        4
  463. kControlPageReplace                EQU        5
  464. kControlPageFlush                EQU        6
  465. kControlPageFlushAsync            EQU        7
  466. ;  For ReleaseData
  467. ; typedef OptionBits                     ReleaseDataOptions
  468.  
  469.  
  470. kReleaseBackingStore            EQU        $00000001
  471. ;   Message related declarations  
  472. ; typedef UInt32                         MessageType
  473.  
  474. ;  Kernel Message Types
  475.  
  476. kAllNonKernelMessageTypes        EQU        $0FFFFFFF
  477. kAllMessages                    EQU        $FFFFFFFF
  478. ;     Options for CreatePort
  479. ; typedef OptionBits                     PortOptions
  480.  
  481. ;     Options for CreateObject
  482. ; typedef OptionBits                     ObjectOptions
  483.  
  484. ;     Options for LockObject
  485. ; typedef OptionBits                     ObjectLockOptions
  486.  
  487.  
  488. kLockObjectWithOneMessage        EQU        $00000001
  489. ;     Options for SetObjectInformation;
  490. ; typedef OptionBits                     SetObjectOptions
  491.  
  492.  
  493. kSetObjectPort                    EQU        $00000002
  494. kSetObjectRefcon                EQU        $00000004
  495. ;   Message System Options  
  496. ; typedef OptionBits                     SendOptions
  497.  
  498.  
  499. kSendTransferKindMask            EQU        $00000003            ; Set by sender
  500. kSendByChoice                    EQU        $00000000
  501. kSendByReference                EQU        $00000001
  502. kSendByValue                    EQU        $00000002
  503. kSendIsBuffered                    EQU        $00000003
  504. kSendIsPrivileged                EQU        $00000008            ; Set by kernel
  505. kSendIsAtomic                    EQU        $00000010            ; Set by sender
  506. kSendPtrsAddressable            EQU        $00000020            ; Set by kernel
  507. kSendPtrsNeedAccessCheck        EQU        $00000040            ; Set by kernel
  508. ; typedef OptionBits                     ReceiveOptions
  509.  
  510.  
  511. kReceiveNoAddressTranslation    EQU        $00000002
  512. ; typedef OptionBits                     AcceptOptions
  513.  
  514.  
  515. kAcceptFunctionIsResident        EQU        $00010000
  516. ;   Message Definition (Given to receiver or acceptor)  
  517. MessageControlBlock        RECORD 0
  518. message                     ds.l    1                ; offset: $0 (0)
  519. addressSpace             ds.l    1                ; offset: $4 (4)
  520. sendingKernelProcess     ds.l    1                ; offset: $8 (8)
  521. sendingTask                 ds.l    1                ; offset: $C (12)
  522. refcon                     ds.l    1                ; offset: $10 (16)
  523. options                     ds.l    1                ; offset: $14 (20)
  524. theType                     ds.l    1                ; offset: $18 (24)
  525. messageContents             ds.l    1                ; offset: $1C (28)
  526. messageContentsSize         ds.l    1                ; offset: $20 (32)
  527. replyBuffer                 ds.l    1                ; offset: $24 (36)
  528. replyBufferSize             ds.l    1                ; offset: $28 (40)
  529. currentStatus             ds.l    1                ; offset: $2C (44)
  530. reserved                 ds.l    4                ; offset: $30 (48)
  531. sizeof                     EQU *                    ; size:   $40 (64)
  532.                         ENDR
  533. ; typedef struct MessageControlBlock *    MessageControlBlockPtr
  534.  
  535.  
  536. kMessageInformationVersion        EQU        1
  537. MessageInformation        RECORD 0
  538. object                     ds.l    1                ; offset: $0 (0)
  539. sendingTask                 ds.l    1                ; offset: $4 (4)
  540. sendingKernelProcess     ds.l    1                ; offset: $8 (8)
  541. sizeof                     EQU *                    ; size:   $C (12)
  542.                         ENDR
  543. ; typedef struct MessageInformation *    MessageInformationPtr
  544.  
  545. ;   Message Accept proc used to receive a message  
  546. ;     Version for GetPortInformation  
  547.  
  548. kPortInformationVersion            EQU        1
  549. ;   Buffer used to return message port information  
  550. PortInformation            RECORD 0
  551. owningKernelProcess         ds.l    1                ; offset: $0 (0)
  552. acceptProc                 ds.l    1                ; offset: $4 (4)
  553. acceptHandler             ds.l    1                ; offset: $8 (8)
  554. theAcceptOptions         ds.l    1                ; offset: $C (12)
  555. acceptRefcon             ds.l    1                ; offset: $10 (16)
  556. objectCount                 ds.l    1                ; offset: $14 (20)
  557. pendingReceives             ds.l    1                ; offset: $18 (24)
  558. pendingSends             ds.l    1                ; offset: $1C (28)
  559. pendingReplies             ds.l    1                ; offset: $20 (32)
  560. transactionCount         ds.l    1                ; offset: $24 (36)
  561. blockedAsyncSenders         ds.l    1                ; offset: $28 (40)
  562. blockedAsyncReceivers     ds.l    1                ; offset: $2C (44)
  563. sizeof                     EQU *                    ; size:   $30 (48)
  564.                         ENDR
  565. ; typedef struct PortInformation *        PortInformationPtr
  566.  
  567.     ENDIF
  568.     IF FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE THEN
  569. ;   Tasks  
  570. ;
  571. ; extern ExecutionLevel CurrentExecutionLevel(void )
  572. ;
  573.     IF GENERATINGCFM THEN
  574.         IMPORT_CFM_FUNCTION CurrentExecutionLevel
  575.     ENDIF
  576.  
  577. ;
  578. ; extern TaskID CurrentTaskID(void )
  579. ;
  580.     IF GENERATINGCFM THEN
  581.         IMPORT_CFM_FUNCTION CurrentTaskID
  582.     ENDIF
  583.  
  584. ;
  585. ; extern OSStatus DelayFor(Duration delayDuration)
  586. ;
  587.     IF GENERATINGCFM THEN
  588.         IMPORT_CFM_FUNCTION DelayFor
  589.     ENDIF
  590.  
  591. ;
  592. ; extern Boolean InPrivilegedMode(void )
  593. ;
  594.     IF GENERATINGCFM THEN
  595.         IMPORT_CFM_FUNCTION InPrivilegedMode
  596.     ENDIF
  597.  
  598. ;   Software Interrupts  
  599. ;
  600. ; extern OSStatus CreateSoftwareInterrupt(SoftwareInterruptHandler handler, TaskID task, void *p1, Boolean persistent, SoftwareInterruptID *theSoftwareInterrupt)
  601. ;
  602.     IF GENERATINGCFM THEN
  603.         IMPORT_CFM_FUNCTION CreateSoftwareInterrupt
  604.     ENDIF
  605.  
  606. ;
  607. ; extern OSStatus SendSoftwareInterrupt(SoftwareInterruptID theSoftwareInterrupt, void *p2)
  608. ;
  609.     IF GENERATINGCFM THEN
  610.         IMPORT_CFM_FUNCTION SendSoftwareInterrupt
  611.     ENDIF
  612.  
  613. ;
  614. ; extern OSStatus DeleteSoftwareInterrupt(SoftwareInterruptID theSoftwareInterrupt)
  615. ;
  616.     IF GENERATINGCFM THEN
  617.         IMPORT_CFM_FUNCTION DeleteSoftwareInterrupt
  618.     ENDIF
  619.  
  620. ;
  621. ; extern void DisableSoftwareInterrupts(void )
  622. ;
  623.     IF GENERATINGCFM THEN
  624.         IMPORT_CFM_FUNCTION DisableSoftwareInterrupts
  625.     ENDIF
  626.  
  627. ;
  628. ; extern void EnableSoftwareInterrupts(void )
  629. ;
  630.     IF GENERATINGCFM THEN
  631.         IMPORT_CFM_FUNCTION EnableSoftwareInterrupts
  632.     ENDIF
  633.  
  634. ;
  635. ; extern Boolean InSoftwareInterruptHandler(void )
  636. ;
  637.     IF GENERATINGCFM THEN
  638.         IMPORT_CFM_FUNCTION InSoftwareInterruptHandler
  639.     ENDIF
  640.  
  641. ;   Completion Routines  
  642. ;
  643. ; extern void DisableCompletionRoutines(void )
  644. ;
  645.     IF GENERATINGCFM THEN
  646.         IMPORT_CFM_FUNCTION DisableCompletionRoutines
  647.     ENDIF
  648.  
  649. ;
  650. ; extern void EnableCompletionRoutines(void )
  651. ;
  652.     IF GENERATINGCFM THEN
  653.         IMPORT_CFM_FUNCTION EnableCompletionRoutines
  654.     ENDIF
  655.  
  656. ;   Secondary Interrupts  
  657. ;
  658. ; extern OSStatus CallSecondaryInterruptHandler2(SecondaryInterruptHandler2 theHandler, ExceptionHandler exceptionHandler, void *p1, void *p2)
  659. ;
  660.     IF GENERATINGCFM THEN
  661.         IMPORT_CFM_FUNCTION CallSecondaryInterruptHandler2
  662.     ENDIF
  663.  
  664. ;
  665. ; extern OSStatus QueueSecondaryInterruptHandler(SecondaryInterruptHandler2 theHandler, ExceptionHandler exceptionHandler, void *p1, void *p2)
  666. ;
  667.     IF GENERATINGCFM THEN
  668.         IMPORT_CFM_FUNCTION QueueSecondaryInterruptHandler
  669.     ENDIF
  670.  
  671. ;   Timers  
  672. ;
  673. ; extern OSStatus SetInterruptTimer(const AbsoluteTime *expirationTime, SecondaryInterruptHandler2 handler, void *p1, TimerID *theTimer)
  674. ;
  675.     IF GENERATINGCFM THEN
  676.         IMPORT_CFM_FUNCTION SetInterruptTimer
  677.     ENDIF
  678.  
  679. ;
  680. ; extern OSStatus CancelTimer(TimerID theTimer, AbsoluteTime *timeRemaining)
  681. ;
  682.     IF GENERATINGCFM THEN
  683.         IMPORT_CFM_FUNCTION CancelTimer
  684.     ENDIF
  685.  
  686. ;   IO related Operations  
  687. ;
  688. ; extern OSStatus PrepareMemoryForIO(IOPreparationTable *theIOPreparationTable)
  689. ;
  690.     IF GENERATINGCFM THEN
  691.         IMPORT_CFM_FUNCTION PrepareMemoryForIO
  692.     ENDIF
  693.  
  694. ;
  695. ; extern OSStatus CheckpointIO(IOPreparationID theIOPreparation, IOCheckpointOptions options)
  696. ;
  697.     IF GENERATINGCFM THEN
  698.         IMPORT_CFM_FUNCTION CheckpointIO
  699.     ENDIF
  700.  
  701. ;   Memory Operations  
  702. ;
  703. ; extern OSStatus GetPageInformation(AddressSpaceID addressSpace, ConstLogicalAddress base, ItemCount requestedPages, PBVersion version, PageInformation *thePageInfo)
  704. ;
  705.     IF GENERATINGCFM THEN
  706.         IMPORT_CFM_FUNCTION GetPageInformation
  707.     ENDIF
  708.  
  709. ;   Processor Cache Related  
  710. ;
  711. ; extern OSStatus SetProcessorCacheMode(AddressSpaceID addressSpace, ConstLogicalAddress base, ByteCount length, ProcessorCacheMode cacheMode)
  712. ;
  713.     IF GENERATINGCFM THEN
  714.         IMPORT_CFM_FUNCTION SetProcessorCacheMode
  715.     ENDIF
  716.  
  717.     ENDIF
  718.     IF FOR_SYSTEM8_PREEMPTIVE THEN
  719. ;   Queues  
  720. ;
  721. ; extern OSStatus CreateKernelQueue(KernelQueueOptions options, KernelQueueID *theQueue)
  722. ;
  723.     IF GENERATINGCFM THEN
  724.         IMPORT_CFM_FUNCTION CreateKernelQueue
  725.     ENDIF
  726.  
  727. ;
  728. ; extern OSStatus DeleteKernelQueue(KernelQueueID theQueue)
  729. ;
  730.     IF GENERATINGCFM THEN
  731.         IMPORT_CFM_FUNCTION DeleteKernelQueue
  732.     ENDIF
  733.  
  734. ;
  735. ; extern OSStatus WaitOnKernelQueue(KernelQueueID theQueue, void **p1, void **p2, void **p3, Duration timeOut)
  736. ;
  737.     IF GENERATINGCFM THEN
  738.         IMPORT_CFM_FUNCTION WaitOnKernelQueue
  739.     ENDIF
  740.  
  741. ;
  742. ; extern OSStatus NotifyKernelQueue(KernelQueueID theQueue, void *p1, void *p2, void *p3)
  743. ;
  744.     IF GENERATINGCFM THEN
  745.         IMPORT_CFM_FUNCTION NotifyKernelQueue
  746.     ENDIF
  747.  
  748. ;
  749. ; extern OSStatus AdjustKernelQueueSIHLimit(KernelQueueID theQueue, SInt32 amount, ItemCount *newLimit)
  750. ;
  751.     IF GENERATINGCFM THEN
  752.         IMPORT_CFM_FUNCTION AdjustKernelQueueSIHLimit
  753.     ENDIF
  754.  
  755. ;   Event Flag Related Operations  
  756. ;
  757. ; extern OSStatus CreateEventGroup(EventGroupID *theGroup)
  758. ;
  759.     IF GENERATINGCFM THEN
  760.         IMPORT_CFM_FUNCTION CreateEventGroup
  761.     ENDIF
  762.  
  763. ;
  764. ; extern OSStatus DeleteEventGroup(EventGroupID theGroup)
  765. ;
  766.     IF GENERATINGCFM THEN
  767.         IMPORT_CFM_FUNCTION DeleteEventGroup
  768.     ENDIF
  769.  
  770. ;
  771. ; extern OSStatus SetEvents(EventGroupID theGroup, EventGroupMask mask)
  772. ;
  773.     IF GENERATINGCFM THEN
  774.         IMPORT_CFM_FUNCTION SetEvents
  775.     ENDIF
  776.  
  777. ;
  778. ; extern OSStatus ClearEvents(EventGroupID theGroup, EventGroupMask mask)
  779. ;
  780.     IF GENERATINGCFM THEN
  781.         IMPORT_CFM_FUNCTION ClearEvents
  782.     ENDIF
  783.  
  784. ;
  785. ; extern OSStatus ReadEvents(EventGroupID theGroup, EventGroupMask *currentValue)
  786. ;
  787.     IF GENERATINGCFM THEN
  788.         IMPORT_CFM_FUNCTION ReadEvents
  789.     ENDIF
  790.  
  791. ;
  792. ; extern OSStatus WaitForEvents(EventGroupID theGroup, Duration timeOut, EventGroupMask mask, EventFlagOperation operation, EventGroupMask *value)
  793. ;
  794.     IF GENERATINGCFM THEN
  795.         IMPORT_CFM_FUNCTION WaitForEvents
  796.     ENDIF
  797.  
  798. ;   KernelProcess Related Operations  
  799. ;
  800. ; extern OSStatus CreateKernelProcess(KernelProcessName name, AddressSpaceID addressSpace, KernelProcessOptions options, KernelProcessID *theKernelProcess)
  801. ;
  802.     IF GENERATINGCFM THEN
  803.         IMPORT_CFM_FUNCTION CreateKernelProcess
  804.     ENDIF
  805.  
  806. ;
  807. ; extern OSStatus ExitKernelProcess(TerminateOptions options, OSStatus exitStatus)
  808. ;
  809.     IF GENERATINGCFM THEN
  810.         IMPORT_CFM_FUNCTION ExitKernelProcess
  811.     ENDIF
  812.  
  813. ;
  814. ; extern OSStatus DeleteKernelProcess(KernelProcessID theKernelProcess, TerminateOptions options, OSStatus deleteStatus)
  815. ;
  816.     IF GENERATINGCFM THEN
  817.         IMPORT_CFM_FUNCTION DeleteKernelProcess
  818.     ENDIF
  819.  
  820. ;
  821. ; extern OSStatus GetKernelProcessesInSystem(ItemCount requestedKernelProcesses, ItemCount *totalKernelProcesses, KernelProcessID *theKernelProcesses)
  822. ;
  823.     IF GENERATINGCFM THEN
  824.         IMPORT_CFM_FUNCTION GetKernelProcessesInSystem
  825.     ENDIF
  826.  
  827. ;
  828. ; extern OSStatus GetKernelProcessInformation(KernelProcessID theKernelProcess, PBVersion version, KernelProcessInformation *kernelProcessInfo)
  829. ;
  830.     IF GENERATINGCFM THEN
  831.         IMPORT_CFM_FUNCTION GetKernelProcessInformation
  832.     ENDIF
  833.  
  834. ;
  835. ; extern KernelProcessID CurrentKernelProcessID(void )
  836. ;
  837.     IF GENERATINGCFM THEN
  838.         IMPORT_CFM_FUNCTION CurrentKernelProcessID
  839.     ENDIF
  840.  
  841. ;   Task Related Operations  
  842. ;
  843. ; extern OSStatus CreateTask(TaskName name, KernelProcessID owningKernelProcess, TaskProc entryPoint, void *parameter, LogicalAddress stackBase, ByteCount stackSize, const KernelNotification *notification, TaskOptions options, TaskID *theTask)
  844. ;
  845.     IF GENERATINGCFM THEN
  846.         IMPORT_CFM_FUNCTION CreateTask
  847.     ENDIF
  848.  
  849. ;
  850. ; extern OSStatus ExitTask(TerminateOptions options, OSStatus exitStatus)
  851. ;
  852.     IF GENERATINGCFM THEN
  853.         IMPORT_CFM_FUNCTION ExitTask
  854.     ENDIF
  855.  
  856. ;
  857. ; extern OSStatus TerminateTask(TaskID theTask, TaskRelationship scope, TerminateOptions options, OSStatus terminateStatus)
  858. ;
  859.     IF GENERATINGCFM THEN
  860.         IMPORT_CFM_FUNCTION TerminateTask
  861.     ENDIF
  862.  
  863. ;
  864. ; extern ByteCount RemainingStackSpace(void )
  865. ;
  866.     IF GENERATINGCFM THEN
  867.         IMPORT_CFM_FUNCTION RemainingStackSpace
  868.     ENDIF
  869.  
  870. ;
  871. ; extern OSStatus GetTaskInformation(TaskID theTask, PBVersion version, TaskInformation *taskInfo)
  872. ;
  873.     IF GENERATINGCFM THEN
  874.         IMPORT_CFM_FUNCTION GetTaskInformation
  875.     ENDIF
  876.  
  877. ;
  878. ; extern OSStatus SetTaskPriority(TaskID theTask, TaskRelationship scope, SetTaskPriorityOptions options)
  879. ;
  880.     IF GENERATINGCFM THEN
  881.         IMPORT_CFM_FUNCTION SetTaskPriority
  882.     ENDIF
  883.  
  884. ;
  885. ; extern OSStatus GetTasksInKernelProcess(KernelProcessID kernelProcess, ItemCount requestedTasks, ItemCount *totalTasks, TaskID *theTasks)
  886. ;
  887.     IF GENERATINGCFM THEN
  888.         IMPORT_CFM_FUNCTION GetTasksInKernelProcess
  889.     ENDIF
  890.  
  891. ;
  892. ; extern OSStatus AllocateTaskStorageIndex(TaskStorageIndex *theIndex)
  893. ;
  894.     IF GENERATINGCFM THEN
  895.         IMPORT_CFM_FUNCTION AllocateTaskStorageIndex
  896.     ENDIF
  897.  
  898. ;
  899. ; extern OSStatus DeallocateTaskStorageIndex(TaskStorageIndex theIndex)
  900. ;
  901.     IF GENERATINGCFM THEN
  902.         IMPORT_CFM_FUNCTION DeallocateTaskStorageIndex
  903.     ENDIF
  904.  
  905. ;
  906. ; extern OSStatus SetTaskStorageValue(TaskStorageIndex theIndex, TaskStorageValue newValue)
  907. ;
  908.     IF GENERATINGCFM THEN
  909.         IMPORT_CFM_FUNCTION SetTaskStorageValue
  910.     ENDIF
  911.  
  912. ;
  913. ; extern TaskStorageValue GetTaskStorageValue(TaskStorageIndex theIndex)
  914. ;
  915.     IF GENERATINGCFM THEN
  916.         IMPORT_CFM_FUNCTION GetTaskStorageValue
  917.     ENDIF
  918.  
  919. ;  Secondary Interrupt Handlers 
  920. ;
  921. ; extern OSStatus AdjustSecondaryInterruptHandlerLimit(SInt32 amount, ItemCount *newLimit)
  922. ;
  923.     IF GENERATINGCFM THEN
  924.         IMPORT_CFM_FUNCTION AdjustSecondaryInterruptHandlerLimit
  925.     ENDIF
  926.  
  927. ;   Timers  
  928. ;
  929. ; extern OSStatus DelayUntil(const AbsoluteTime *expirationTime)
  930. ;
  931.     IF GENERATINGCFM THEN
  932.         IMPORT_CFM_FUNCTION DelayUntil
  933.     ENDIF
  934.  
  935. ;
  936. ; extern OSStatus SetTimer(const AbsoluteTime *expirationTime, const KernelNotification *notification, TimerOptions options, TimerID *theTimer)
  937. ;
  938.     IF GENERATINGCFM THEN
  939.         IMPORT_CFM_FUNCTION SetTimer
  940.     ENDIF
  941.  
  942. ;
  943. ; extern OSStatus ResetTimer(TimerID theTimer, const AbsoluteTime *expirationTime, const KernelNotification *notification, TimerOptions options)
  944. ;
  945.     IF GENERATINGCFM THEN
  946.         IMPORT_CFM_FUNCTION ResetTimer
  947.     ENDIF
  948.  
  949. ;
  950. ; extern OSStatus AdjustInterruptTimerSIHLimit(SInt32 amount, ItemCount *newLimit)
  951. ;
  952.     IF GENERATINGCFM THEN
  953.         IMPORT_CFM_FUNCTION AdjustInterruptTimerSIHLimit
  954.     ENDIF
  955.  
  956. ;   Address Space Management  
  957. ;
  958. ; extern OSStatus CreateAddressSpace(AddressSpaceID *theAddressSpace)
  959. ;
  960.     IF GENERATINGCFM THEN
  961.         IMPORT_CFM_FUNCTION CreateAddressSpace
  962.     ENDIF
  963.  
  964. ;
  965. ; extern OSStatus DeleteAddressSpace(AddressSpaceID theAddressSpace)
  966. ;
  967.     IF GENERATINGCFM THEN
  968.         IMPORT_CFM_FUNCTION DeleteAddressSpace
  969.     ENDIF
  970.  
  971. ;
  972. ; extern OSStatus GetAddressSpacesInSystem(ItemCount requestedAddressSpaces, ItemCount *totalAddressSpaces, AddressSpaceID *theAddressSpaces)
  973. ;
  974.     IF GENERATINGCFM THEN
  975.         IMPORT_CFM_FUNCTION GetAddressSpacesInSystem
  976.     ENDIF
  977.  
  978. ;
  979. ; extern OSStatus GetSpaceInformation(AddressSpaceID theAddressSpace, PBVersion version, SpaceInformation *spaceInfo)
  980. ;
  981.     IF GENERATINGCFM THEN
  982.         IMPORT_CFM_FUNCTION GetSpaceInformation
  983.     ENDIF
  984.  
  985. ;
  986. ; extern OSStatus InterspaceBlockCopy(AddressSpaceID sourceAddressSpace, AddressSpaceID targetAddressSpace, ConstLogicalAddress sourceBase, LogicalAddress targetBase, ByteCount length, InterspaceCopyOptions options)
  987. ;
  988.     IF GENERATINGCFM THEN
  989.         IMPORT_CFM_FUNCTION InterspaceBlockCopy
  990.     ENDIF
  991.  
  992. ;
  993. ; extern OSStatus CheckUserAccess(ConstLogicalAddress address, ByteCount length, MemoryReferenceKind referenceKind)
  994. ;
  995.     IF GENERATINGCFM THEN
  996.         IMPORT_CFM_FUNCTION CheckUserAccess
  997.     ENDIF
  998.  
  999. ;
  1000. ; extern AddressSpaceID CurrentAddressSpaceID(void )
  1001. ;
  1002.     IF GENERATINGCFM THEN
  1003.         IMPORT_CFM_FUNCTION CurrentAddressSpaceID
  1004.     ENDIF
  1005.  
  1006. ;   Area Management  
  1007. ;
  1008. ; extern OSStatus CreateArea(KernelProcessID owningKernelProcess, BackingObjectID backingObject, const BackingAddress *backingBase, ByteCount backingLength, MemoryAccessLevel userAccessLevel, MemoryAccessLevel privilegedAccessLevel, ByteCount guardLength, AreaOptions options, LogicalAddress *areaBase, AreaID *theArea)
  1009. ;
  1010.     IF GENERATINGCFM THEN
  1011.         IMPORT_CFM_FUNCTION CreateArea
  1012.     ENDIF
  1013.  
  1014. ;
  1015. ; extern OSStatus CreateAreaForRange(KernelProcessID owningKernelProcess, AddressSpaceID otherSpace, ConstLogicalAddress otherBase, ByteCount length, MemoryAccessLevel userAccessLevel, MemoryAccessLevel privilegedAccessLevel, ByteCount guardLength, AreaOptions options, LogicalAddress *areaBase, AreaID *theArea)
  1016. ;
  1017.     IF GENERATINGCFM THEN
  1018.         IMPORT_CFM_FUNCTION CreateAreaForRange
  1019.     ENDIF
  1020.  
  1021. ;
  1022. ; extern OSStatus DeleteArea(AreaID theArea)
  1023. ;
  1024.     IF GENERATINGCFM THEN
  1025.         IMPORT_CFM_FUNCTION DeleteArea
  1026.     ENDIF
  1027.  
  1028. ;
  1029. ; extern OSStatus GetAreaInformation(AreaID theArea, PBVersion version, AreaInformation *areaInfo)
  1030. ;
  1031.     IF GENERATINGCFM THEN
  1032.         IMPORT_CFM_FUNCTION GetAreaInformation
  1033.     ENDIF
  1034.  
  1035. ;
  1036. ; extern OSStatus GetAreaFromAddress(AddressSpaceID addressSpace, ConstLogicalAddress address, AreaID *theArea)
  1037. ;
  1038.     IF GENERATINGCFM THEN
  1039.         IMPORT_CFM_FUNCTION GetAreaFromAddress
  1040.     ENDIF
  1041.  
  1042. ;
  1043. ; extern OSStatus GetAreasInAddressSpace(AddressSpaceID addressSpace, ItemCount requestedAreas, ItemCount *totalAreas, AreaID *theAreas)
  1044. ;
  1045.     IF GENERATINGCFM THEN
  1046.         IMPORT_CFM_FUNCTION GetAreasInAddressSpace
  1047.     ENDIF
  1048.  
  1049. ;
  1050. ; extern OSStatus SetAreaAccess(AreaID theArea, MemoryAccessLevel userAccessLevel, MemoryAccessLevel privilegedAccessLevel)
  1051. ;
  1052.     IF GENERATINGCFM THEN
  1053.         IMPORT_CFM_FUNCTION SetAreaAccess
  1054.     ENDIF
  1055.  
  1056. ;
  1057. ; extern OSStatus SetAreaBackingBase(AreaID theArea, const BackingAddress *backingBase)
  1058. ;
  1059.     IF GENERATINGCFM THEN
  1060.         IMPORT_CFM_FUNCTION SetAreaBackingBase
  1061.     ENDIF
  1062.  
  1063. ;
  1064. ; extern OSStatus CreateAreaReservation(KernelProcessID owningKernelProcess, LogicalAddress *reservationBase, ByteCount length, ReservationOptions options, AreaReservationID *theReservation)
  1065. ;
  1066.     IF GENERATINGCFM THEN
  1067.         IMPORT_CFM_FUNCTION CreateAreaReservation
  1068.     ENDIF
  1069.  
  1070. ;
  1071. ; extern OSStatus DeleteAreaReservation(AreaReservationID theReservation)
  1072. ;
  1073.     IF GENERATINGCFM THEN
  1074.         IMPORT_CFM_FUNCTION DeleteAreaReservation
  1075.     ENDIF
  1076.  
  1077. ;
  1078. ; extern OSStatus GetReservationInformation(AreaReservationID theReservation, PBVersion version, ReservationInformation *reservationInfo)
  1079. ;
  1080.     IF GENERATINGCFM THEN
  1081.         IMPORT_CFM_FUNCTION GetReservationInformation
  1082.     ENDIF
  1083.  
  1084. ;
  1085. ; extern OSStatus GetReservationsInAddressSpace(AddressSpaceID addressSpace, ItemCount requestedReservations, ItemCount *totalReservations, AreaReservationID *theReservations)
  1086. ;
  1087.     IF GENERATINGCFM THEN
  1088.         IMPORT_CFM_FUNCTION GetReservationsInAddressSpace
  1089.     ENDIF
  1090.  
  1091. ;   Processor Cache Related  
  1092. ;
  1093. ; extern OSStatus DataToCode(AddressSpaceID addressSpace, ConstLogicalAddress base, ByteCount length)
  1094. ;
  1095.     IF GENERATINGCFM THEN
  1096.         IMPORT_CFM_FUNCTION DataToCode
  1097.     ENDIF
  1098.  
  1099. ;
  1100. ; extern OSStatus FlushRange(AddressSpaceID addressSpace, ConstLogicalAddress base, ByteCount length)
  1101. ;
  1102.     IF GENERATINGCFM THEN
  1103.         IMPORT_CFM_FUNCTION FlushRange
  1104.     ENDIF
  1105.  
  1106. ;   Paging control operations  
  1107. ;
  1108. ; extern OSStatus ControlPagingForRange(AddressSpaceID addressSpace, ConstLogicalAddress base, ByteCount length, PageControlOperation operation)
  1109. ;
  1110.     IF GENERATINGCFM THEN
  1111.         IMPORT_CFM_FUNCTION ControlPagingForRange
  1112.     ENDIF
  1113.  
  1114. ;
  1115. ; extern OSStatus ReleaseData(AddressSpaceID addressSpace, ConstLogicalAddress base, ByteCount length, ReleaseDataOptions options)
  1116. ;
  1117.     IF GENERATINGCFM THEN
  1118.         IMPORT_CFM_FUNCTION ReleaseData
  1119.     ENDIF
  1120.  
  1121. ;   Message Port Management  
  1122. ;
  1123. ; extern OSStatus CreatePort(PortOptions options, PortID *thePort)
  1124. ;
  1125.     IF GENERATINGCFM THEN
  1126.         IMPORT_CFM_FUNCTION CreatePort
  1127.     ENDIF
  1128.  
  1129. ;
  1130. ; extern OSStatus DeletePort(PortID thePort)
  1131. ;
  1132.     IF GENERATINGCFM THEN
  1133.         IMPORT_CFM_FUNCTION DeletePort
  1134.     ENDIF
  1135.  
  1136. ;
  1137. ; extern OSStatus GetPortInformation(PortID thePort, PBVersion version, PortInformation *portInfo)
  1138. ;
  1139.     IF GENERATINGCFM THEN
  1140.         IMPORT_CFM_FUNCTION GetPortInformation
  1141.     ENDIF
  1142.  
  1143. ;
  1144. ; extern OSStatus GetPortsInSystem(ItemCount requestedPorts, ItemCount *totalPorts, PortID *thePorts)
  1145. ;
  1146.     IF GENERATINGCFM THEN
  1147.         IMPORT_CFM_FUNCTION GetPortsInSystem
  1148.     ENDIF
  1149.  
  1150. ;   Message Object Management  
  1151. ;
  1152. ; extern OSStatus CreateObject(PortID port, void *refcon, ObjectOptions options, ObjectID *theObject)
  1153. ;
  1154.     IF GENERATINGCFM THEN
  1155.         IMPORT_CFM_FUNCTION CreateObject
  1156.     ENDIF
  1157.  
  1158. ;
  1159. ; extern OSStatus DeleteObject(ObjectID theObject)
  1160. ;
  1161.     IF GENERATINGCFM THEN
  1162.         IMPORT_CFM_FUNCTION DeleteObject
  1163.     ENDIF
  1164.  
  1165. ;
  1166. ; extern OSStatus LockObject(ObjectID theObject, ObjectLockOptions options, Duration timeOut)
  1167. ;
  1168.     IF GENERATINGCFM THEN
  1169.         IMPORT_CFM_FUNCTION LockObject
  1170.     ENDIF
  1171.  
  1172. ;
  1173. ; extern OSStatus UnlockObject(ObjectID theObject)
  1174. ;
  1175.     IF GENERATINGCFM THEN
  1176.         IMPORT_CFM_FUNCTION UnlockObject
  1177.     ENDIF
  1178.  
  1179. ;
  1180. ; extern OSStatus GetObjectInformation(ObjectID theObject, PortID *port, void **refcon)
  1181. ;
  1182.     IF GENERATINGCFM THEN
  1183.         IMPORT_CFM_FUNCTION GetObjectInformation
  1184.     ENDIF
  1185.  
  1186. ;
  1187. ; extern OSStatus SetObjectInformation(ObjectID theObject, SetObjectOptions options, PortID port, void *refcon)
  1188. ;
  1189.     IF GENERATINGCFM THEN
  1190.         IMPORT_CFM_FUNCTION SetObjectInformation
  1191.     ENDIF
  1192.  
  1193. ;
  1194. ; extern OSStatus GetObjectsInPort(PortID port, ItemCount requestedObjects, ItemCount *totalObjects, ObjectID *theObjects)
  1195. ;
  1196.     IF GENERATINGCFM THEN
  1197.         IMPORT_CFM_FUNCTION GetObjectsInPort
  1198.     ENDIF
  1199.  
  1200. ;   Message Transaction Operations  
  1201. ;
  1202. ; extern OSStatus SendMessageSync(ObjectID object, MessageType theType, ConstLogicalAddress messageContents, ByteCount messageContentsSize, LogicalAddress replyBuffer, ByteCount *replyBufferSize, SendOptions options, Duration timeOut)
  1203. ;
  1204.     IF GENERATINGCFM THEN
  1205.         IMPORT_CFM_FUNCTION SendMessageSync
  1206.     ENDIF
  1207.  
  1208. ;
  1209. ; extern OSStatus SendMessageAsync(ObjectID object, MessageType theType, ConstLogicalAddress messageContents, ByteCount messageContentsSize, LogicalAddress replyBuffer, ByteCount replyBufferSize, SendOptions options, const KernelNotification *notification, ByteCount *replySize, MessageID *theMessage)
  1210. ;
  1211.     IF GENERATINGCFM THEN
  1212.         IMPORT_CFM_FUNCTION SendMessageAsync
  1213.     ENDIF
  1214.  
  1215. ;
  1216. ; extern OSStatus AcceptMessage(PortID port, MessageType theTypes, MessageAcceptProc acceptProc, ExceptionHandler theExceptionHandler, AcceptOptions options, void *acceptRefcon)
  1217. ;
  1218.     IF GENERATINGCFM THEN
  1219.         IMPORT_CFM_FUNCTION AcceptMessage
  1220.     ENDIF
  1221.  
  1222. ;
  1223. ; extern OSStatus ReceiveMessageSync(PortID port, MessageType theTypes, MessageControlBlock *theControlBlock, LogicalAddress buffer, ByteCount bufferSize, ReceiveOptions options, Duration timeOut)
  1224. ;
  1225.     IF GENERATINGCFM THEN
  1226.         IMPORT_CFM_FUNCTION ReceiveMessageSync
  1227.     ENDIF
  1228.  
  1229. ;
  1230. ; extern OSStatus ReceiveMessageAsync(PortID port, MessageType theTypes, MessageControlBlock *theControlBlock, LogicalAddress buffer, ByteCount bufferSize, ReceiveOptions options, const KernelNotification *notification, ReceiveID *theReceive)
  1231. ;
  1232.     IF GENERATINGCFM THEN
  1233.         IMPORT_CFM_FUNCTION ReceiveMessageAsync
  1234.     ENDIF
  1235.  
  1236. ;
  1237. ; extern OSStatus ReplyToMessage(MessageID theMessage, OSStatus status, ConstLogicalAddress replyBuffer, ByteCount replyBufferSize)
  1238. ;
  1239.     IF GENERATINGCFM THEN
  1240.         IMPORT_CFM_FUNCTION ReplyToMessage
  1241.     ENDIF
  1242.  
  1243. ;
  1244. ; extern OSStatus ReplyToMessageAndReceive(MessageID theMessage, OSStatus status, ConstLogicalAddress replyBuffer, ByteCount replyBufferSize, PortID port, MessageType theTypes, MessageControlBlock *theControlBlock, LogicalAddress receiveBuffer, ByteCount receiveBufferSize, ReceiveOptions options, Duration timeOut)
  1245. ;
  1246.     IF GENERATINGCFM THEN
  1247.         IMPORT_CFM_FUNCTION ReplyToMessageAndReceive
  1248.     ENDIF
  1249.  
  1250. ;   Miscellaneous Messaging operations  
  1251. ;
  1252. ; extern OSStatus CancelAsyncSend(MessageID theMessage)
  1253. ;
  1254.     IF GENERATINGCFM THEN
  1255.         IMPORT_CFM_FUNCTION CancelAsyncSend
  1256.     ENDIF
  1257.  
  1258. ;
  1259. ; extern OSStatus CancelAsyncReceive(ReceiveID theReceive)
  1260. ;
  1261.     IF GENERATINGCFM THEN
  1262.         IMPORT_CFM_FUNCTION CancelAsyncReceive
  1263.     ENDIF
  1264.  
  1265. ;
  1266. ; extern OSStatus GetMessageInformation(MessageID theMessage, PBVersion version, MessageInformation *messageInfo)
  1267. ;
  1268.     IF GENERATINGCFM THEN
  1269.         IMPORT_CFM_FUNCTION GetMessageInformation
  1270.     ENDIF
  1271.  
  1272. ;   Miscellaneous System operations  
  1273. ;
  1274. ; extern OSStatus GetSystemInformation(PBVersion version, SystemInformation *systemInfo)
  1275. ;
  1276.     IF GENERATINGCFM THEN
  1277.         IMPORT_CFM_FUNCTION GetSystemInformation
  1278.     ENDIF
  1279.  
  1280. ;     Notifications  
  1281. ;
  1282. ; extern OSStatus DeliverKernelNotification(const KernelNotification *notification, OSStatus status)
  1283. ;
  1284.     IF GENERATINGCFM THEN
  1285.         IMPORT_CFM_FUNCTION DeliverKernelNotification
  1286.     ENDIF
  1287.  
  1288.     ENDIF
  1289.     IF FOR_SYSTEM8_PREEMPTIVE THEN
  1290. ;  These are defined in Memory for System 7 
  1291. ;
  1292. ; pascal void BlockMove(const void *srcPtr, void *destPtr, long byteCount)
  1293. ;
  1294.     IF GENERATINGCFM THEN
  1295.         IMPORT_CFM_FUNCTION BlockMove
  1296.     ENDIF
  1297.  
  1298. ;
  1299. ; pascal void BlockMoveData(const void *srcPtr, void *destPtr, long byteCount)
  1300. ;
  1301.     IF GENERATINGCFM THEN
  1302.         IMPORT_CFM_FUNCTION BlockMoveData
  1303.     ENDIF
  1304.  
  1305. ;
  1306. ; extern void BlockMoveUncached(const void *srcPtr, void *destPtr, long byteCount)
  1307. ;
  1308.     IF GENERATINGCFM THEN
  1309.         IMPORT_CFM_FUNCTION BlockMoveUncached
  1310.     ENDIF
  1311.  
  1312. ;
  1313. ; extern void BlockMoveDataUncached(const void *srcPtr, void *destPtr, long byteCount)
  1314. ;
  1315.     IF GENERATINGCFM THEN
  1316.         IMPORT_CFM_FUNCTION BlockMoveDataUncached
  1317.     ENDIF
  1318.  
  1319. ;
  1320. ; extern void BlockZero(void *destPtr, long byteCount)
  1321. ;
  1322.     IF GENERATINGCFM THEN
  1323.         IMPORT_CFM_FUNCTION BlockZero
  1324.     ENDIF
  1325.  
  1326. ;
  1327. ; extern void BlockZeroUncached(void *destPtr, long byteCount)
  1328. ;
  1329.     IF GENERATINGCFM THEN
  1330.         IMPORT_CFM_FUNCTION BlockZeroUncached
  1331.     ENDIF
  1332.  
  1333.     ENDIF
  1334.     ENDIF ; __KERNEL__ 
  1335.  
  1336.